Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add multiple otsu as threshold method with selection range of components #710

Merged
merged 13 commits into from
Oct 15, 2022

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Sep 12, 2022

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 12, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.10%.

Quality metrics Before After Change
Complexity 3.38 ⭐ 3.35 ⭐ -0.03 👍
Method Length 56.04 ⭐ 56.72 ⭐ 0.68 👎
Working memory 7.05 🙂 7.06 🙂 0.01 👎
Quality 72.26% 🙂 72.16% 🙂 -0.10% 👎
Other metrics Before After Change
Lines 2781 2892 111
Changed files Quality Before Quality After Quality Change
package/PartSegCore/analysis/measurement_calculation.py 71.07% 🙂 70.90% 🙂 -0.17% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 68.84% 🙂 69.15% 🙂 0.31% 👍
package/PartSegCore/segmentation/threshold.py 84.72% ⭐ 81.08% ⭐ -3.64% 👎
package/tests/test_PartSegCore/test_segmentation.py 72.91% 🙂 73.00% 🙂 0.09% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 24 😞 412 ⛔ 12 😞 26.72% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py BaseMultiScaleOpening.calculation_run 15 🙂 399 ⛔ 15 😞 29.13% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/measurement_calculation.py MeasurementProfile.calculate_yield 14 🙂 326 ⛔ 34.22% 😞 Try splitting into smaller methods
package/PartSegCore/analysis/measurement_calculation.py MeasurementResult.get_separated 15 🙂 196 😞 14 😞 38.04% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py BaseThresholdFlowAlgorithm.calculation_run 8 ⭐ 263 ⛔ 15 😞 38.93% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Sep 12, 2022

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/710
Updated: 2022-10-15T23:06:51.603972

Czaki and others added 2 commits September 12, 2022 16:07
…omponents (Sourcery refactored) (#711)

Co-authored-by: Sourcery AI <>
@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Base: 88.64% // Head: 88.66% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (c53cefb) compared to base (54958d1).
Patch coverage: 98.70% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #710      +/-   ##
===========================================
+ Coverage    88.64%   88.66%   +0.01%     
===========================================
  Files          190      190              
  Lines        29404    29450      +46     
===========================================
+ Hits         26066    26112      +46     
  Misses        3338     3338              
Impacted Files Coverage Δ
package/PartSegCore/segmentation/threshold.py 98.12% <98.07%> (+0.42%) ⬆️
...ge/PartSegCore/analysis/measurement_calculation.py 97.07% <100.00%> (-0.04%) ⬇️
...egmentation/restartable_segmentation_algorithms.py 96.36% <100.00%> (+0.07%) ⬆️
...ackage/tests/test_PartSegCore/test_segmentation.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Czaki Czaki merged commit cb16b0e into develop Oct 15, 2022
@Czaki Czaki deleted the feature/multipe_otsu_components branch October 15, 2022 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant